<?php 


	//获取上传的临时路径
$f = $_FILES['pic']['tmp_name'];
//拼接移动后路径
$name = './uploads/'.$_FILES['pic']['name'];
//移动文件
move_uploaded_file($f,$name);

// $img = '<img src="'.$name.'" alt="">';
// echo $img;

$str = '<script type="text/javascript">
//上传成功后 修改父级窗口中的信息
var img = parent.document.getElementById("img");

img.src = "'.$name.'";

</script>';

echo $str;


 ?>